Skip to content

Conversation

@crazy-max
Copy link
Member

@crazy-max crazy-max commented Jul 11, 2025

Description

Adds CDI page to build section.

Related issues or tickets

Reviews

  • Technical review
  • Editorial review
  • Product review

@github-actions github-actions bot added the area/build Relates to Dockerfiles or docker build command label Jul 11, 2025
@netlify
Copy link

netlify bot commented Jul 11, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 2944e33
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/687dfe2438aeb60008489e20
😎 Deploy Preview https://deploy-preview-23069--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@crazy-max crazy-max force-pushed the build-cdi branch 5 times, most recently from 5465608 to 4ef0c39 Compare July 11, 2025 11:43
@crazy-max crazy-max marked this pull request as ready for review July 11, 2025 11:51
@crazy-max crazy-max requested a review from ArthurFlag as a code owner July 11, 2025 11:51
@ArthurFlag
Copy link
Contributor

Could you edit this line to

SECRETS_SCAN_OMIT_PATHS = "public/contribute/file-conventions/index.html,public/content/manuals/build/building/cdi.html"

?

@github-actions github-actions bot added the area/release Relates to CI or deployment label Jul 11, 2025
@crazy-max
Copy link
Member Author

crazy-max commented Jul 11, 2025

Thanks looks good now but do you know why it is happening? Looking at the logs: https://app.netlify.com/projects/docsdocker/deploys/6870f8f33387050008ca7b11

1:45:06 PM: ❯ Scanning complete. 8540 file(s) scanned. Secrets scanning found 0 instance(s) of secrets and 1 instance(s) of likely secrets in build output or repo code.
1:45:06 PM: ​
1:45:06 PM: "LS0t***" detected as a likely secret:
1:45:06 PM:   found value at line 719 in public/build/building/cdi/index.html
1:45:06 PM: ​
1:45:06 PM: To prevent exposing secrets, the build will fail until these likely secret values are not found in build output or repo files.
1:45:06 PM: ​
1:45:06 PM: If these are expected, use SECRETS_SCAN_SMART_DETECTION_OMIT_VALUES, or SECRETS_SCAN_SMART_DETECTION_ENABLED to prevent detecting.
1:45:06 PM: ​
1:45:06 PM: For more information on secrets scanning, see the Netlify Docs: https://ntl.fyi/configure-secrets-scanning
1:45:06 PM: ​
1:45:06 PM: Secrets scanning detected secrets in files during build.      
1:45:06 PM: ────────────────────────────────────────────────────────────────

It says cdi page contains LS0t*** as secret but I don't have any occurrence like this.

@ArthurFlag
Copy link
Contributor

The LST0 issue is the one we had a few weeks ago: it comes from codeblocks that we convert into Base64 for the copy button, so one of your codeblocks contains that string once converted 🙃

@crazy-max
Copy link
Member Author

The LST0 issue is the one we had a few weeks ago: it comes from codeblocks that we convert into Base64 for the copy button, so one of your codeblocks contains that string once converted 🙃

Ah I see but still wonder why just file-conventions and cdi pages are affected and not others using codeblocks?

@crazy-max crazy-max force-pushed the build-cdi branch 2 times, most recently from b0fd26d to 3153d21 Compare July 11, 2025 16:09
@thaJeztah
Copy link
Member

Ah I see but still wonder why just file-conventions and cdi pages are affected and not others using codeblocks?

I guess just "luck" if the script base64 encodes the content of the codeblock (before styling).

@thaJeztah
Copy link
Member

Did a quick check; LS0t is --- (base64 encoded)

Copy link
Contributor

@ArthurFlag ArthurFlag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff. The troubleshooting in the middle of it will be super useful for AI scrapers 👍

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I started writing some comments that I didn't submit yet 😂

cdiVersion: "0.6.0"
kind: "vendor1.com/device"
devices:
- name: foo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could use some name like my-device instead of foo (probably also for the filename and env-var)

Comment on lines +75 to +95
GC Policy rule#0:
All: false
Filters: type==source.local,type==exec.cachemount,type==source.git.checkout
Keep Duration: 48h0m0s
Max Used Space: 658.9MiB
GC Policy rule#1:
All: false
Keep Duration: 1440h0m0s
Reserved Space: 4.657GiB
Max Used Space: 953.7MiB
Min Free Space: 2.794GiB
GC Policy rule#2:
All: false
Reserved Space: 4.657GiB
Max Used Space: 953.7MiB
Min Free Space: 2.794GiB
GC Policy rule#3:
All: true
Reserved Space: 4.657GiB
Max Used Space: 953.7MiB
Min Free Space: 2.794GiB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should omit these in the example output, as they're not really relevant for this manual, e.g.;

Suggested change
GC Policy rule#0:
All: false
Filters: type==source.local,type==exec.cachemount,type==source.git.checkout
Keep Duration: 48h0m0s
Max Used Space: 658.9MiB
GC Policy rule#1:
All: false
Keep Duration: 1440h0m0s
Reserved Space: 4.657GiB
Max Used Space: 953.7MiB
Min Free Space: 2.794GiB
GC Policy rule#2:
All: false
Reserved Space: 4.657GiB
Max Used Space: 953.7MiB
Min Free Space: 2.794GiB
GC Policy rule#3:
All: true
Reserved Space: 4.657GiB
Max Used Space: 953.7MiB
Min Free Space: 2.794GiB
# ...

Now let's create a container builder named `gpubuilder` using Buildx:

```console
$ docker buildx create --name gpubuilder --driver-opt "image=crazymax/buildkit:v0.23.2-ubuntu-nvidia" --bootstrap
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to have this somewhere more "official" I guess (not a blocker); how complicated is this image to build? Would it be an option to add the Dockerfile here (if it's just 2 .. 3 steps)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it will be in the future, this is tracked in moby/buildkit#5944.

Would it be an option to add the Dockerfile here (if it's just 2 .. 3 steps)?

It's the BuildKit Dockerfile so not an option 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha! I was hoping it could be some COPY --from=buildkit-bin ... to compose the image, but based on a different base image.

Definitely not a blocker!

title: Container Device Interface (CDI)
weight: 60
description: Using CDI to access GPUs and other devices in your builds
keywords: build, buildkit, buildx, guide, tutorial, cdi, device, gpu, nvidia, cuda, amd, rocm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like vale may need to be taught some of these acronyms (nvidia, coda ..) or would it be because they're lowercase here?

Copy link
Member Author

@crazy-max crazy-max Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think keywords should be excluded from Vale analysis or at least don't check casing

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to revisit our Vale configuration to include a few more terms to the "allowlist". Yea, excluding metadata could be a good option.

@crazy-max crazy-max force-pushed the build-cdi branch 2 times, most recently from 19103b6 to 266606a Compare July 18, 2025 12:03
Comment on lines 215 to 219
> [!NOTE]
> If you are creating a container builder on WSL, you need to ensure that
> [Docker Desktop](../../desktop/_index.md) is installed and [WSL 2 GPU Paravirtualization](../../desktop/features/gpu.md#prerequisites)
> is enabled. Buildx v0.26+ is also required to mount the WSL libraries in the
> container.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this section related to docker/buildx#3320

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this part for now as this will happen in the next 0.27 milestone.

Signed-off-by: CrazyMax <[email protected]>
@crazy-max crazy-max merged commit 284b194 into docker:main Jul 21, 2025
14 of 15 checks passed
@crazy-max crazy-max deleted the build-cdi branch July 21, 2025 09:12
@crazy-max crazy-max mentioned this pull request Jul 21, 2025
3 tasks
aevesdocker pushed a commit that referenced this pull request Aug 26, 2025
follow-up
#23069 (comment)

## Related issues or tickets

* docker/buildx#3320

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Technical review
- [ ] Editorial review
- [ ] Product review

Signed-off-by: CrazyMax <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Relates to Dockerfiles or docker build command area/release Relates to CI or deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants